-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[nrf fromtree] Upstream fixes for NCS 2.6.0 #1508
Merged
jfischer-no
merged 12 commits into
nrfconnect:main
from
anangl:upstream_fixes_for_2_6_0
Feb 19, 2024
Merged
[nrf fromtree] Upstream fixes for NCS 2.6.0 #1508
jfischer-no
merged 12 commits into
nrfconnect:main
from
anangl:upstream_fixes_for_2_6_0
Feb 19, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…for nRF5340 The CLOCK HAL header is only needed for nRF5340 SoC. It's used when user wants to configure SPIM instance to 32 Mbps. The HAL checks if is running at 128 MHz as only then 32 Mbps is supported. Signed-off-by: Adam Wojasinski <[email protected]> (cherry picked from commit e6bcc98) Signed-off-by: Andrzej Głąbek <[email protected]>
…ck for frequency Some targets may not have `NRF_SPIM_HAS_32_MHZ_FREQ` or `NRF_SPIM_HAS_16_MHZ_FREQ` symbols but have `NRF_SPIM_HAS_PRESCALER` symbol defined. The symbol informs that target supports 32 MHz and 16 MHz frequencies for SPIM instances. Signed-off-by: Adam Wojasinski <[email protected]> (cherry picked from commit 058eebe) Signed-off-by: Andrzej Głąbek <[email protected]>
… address check Instead of assuming only RAM is accessible by EasyDMA, use the generic DMA accessible function. Signed-off-by: Chaitanya Tata <[email protected]> (cherry picked from commit 2c0f121) Signed-off-by: Andrzej Głąbek <[email protected]>
This check has to be done independent of whether RAM is used for buffers or not and depends on device maximum length property. Signed-off-by: Chaitanya Tata <[email protected]> (cherry picked from commit 0a1eff8) Signed-off-by: Andrzej Głąbek <[email protected]>
…n nRF52832 While enabling workaround for PAN 58 the PPI driver is used. This requires the nrfx PPI driver to be enabled thus CONFIG_NRFX_PPI Kconfig symbol needs to be set. Jira: NRFX-1616 Signed-off-by: Marcin Szymczyk <[email protected]> (cherry picked from commit 2a38230) Signed-off-by: Andrzej Głąbek <[email protected]>
… from RAM region This patch adds support for RX buffer placed by a linker in memory region defined in SPIM devicetree node. The buffer is placed in memory region defined as devicetree node. The memory region node's reference is then stored in `memory-regions` property of SPIM node. Added build time assertion to check if `CONFIG_SPI_NRFX_RAM_BUFFER_SIZE` Kconfig symbol has value greater than 0 when given SPIM node has `memory-region` property. Signed-off-by: Adam Wojasinski <[email protected]> (cherry picked from commit ae75a8f) Signed-off-by: Andrzej Głąbek <[email protected]>
…nfig symbol Update documentation for SPI_NRFX_RAM_BUFFER_SIZE Kconfig symbol to reflect new usage of it. Now the symbol specifies size of RX buffer. The change introducing support for RX buffer placed by a linker in memory region defined in SPIM devicetree node is in a parent commit of that one. Signed-off-by: Adam Wojasinski <[email protected]> (cherry picked from commit c88b492) Signed-off-by: Andrzej Głąbek <[email protected]>
…ly 168 Use the already available in the tree mechanism of adding assembly instructions right after WFI/WFE to implement the workaround for nRF5340 anomaly 168 (replace the 4 NOP solution used on the network core as it turned out to be insufficient) and provide two related Kconfig options so that users are able to adjust the workaround to their actual needs (disable it entirely or use it in the extended version). Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit 23e15c4)
With GCC 12.3 and binutils 2.40, the build fails with: <...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S: Assembler messages: <...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S:51: Error: junk at end of line, first unrecognized character is `n' <...>/zephyr/arch/arm/core/cortex_m/cpu_idle.S:133: Info: macro invoked from here Because the SOC_ON_EXIT_CPU_IDLE macro puts all the statements on a single line, there must be a semicolon after .rept Signed-off-by: Ben Wolsieffer <[email protected]> (cherry picked from commit 37352d3) Signed-off-by: Andrzej Głąbek <[email protected]>
... so that it is possible to use a GPIO expander pin as the CS line. Communication with the expander may involve an operation that cannot be done from the interrupt context (e.g. an I2C transaction). Signed-off-by: Andrzej Głąbek <[email protected]> (cherry picked from commit db4344b)
…ion layer Whenever UART_RX_DISABLED event is received module attempts to re-enable receiver since in interrupt driven API receiver is always on. However, it is possible that there is no free buffers and in that case attempt to enable the receiver will fail with -EBUSY. That scenario shall be accepted since the receiver will be re-enabled when at least one buffer will be freed. Given that, -EBUSY return shall be accepted (no assert) and number of pending RX buffer requests shall be reset only on successful enabling. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit f6ecad2) Signed-off-by: Andrzej Głąbek <[email protected]>
…eemption UART_RX_RDY event can be generated from UARTE interrupt or k_timer handler. When ENDRX event occurs then k_timer is stopped (it can be restarted if there is another buffer provided). However, if UARTE interrupt priority is higher than k_timer priority (RTC is used underneath) then k_timer handler may still be executed later. K_timer notifies new bytes based on RXDRDY HW event which is counter by the TIMER (using PPI). It may happen that RXDRDY event arrives due to byte received into RX FIFO but since there is not buffer provided it stays in that FIFO. Given all this, it was possible that RX_RDY event was reported from ENDRX UARTE event, timer was stopped but because UARTE interrupt had higher priority timer handler is executed after UARTE interrupt is handled. In timer handler TIMER counter reports more bytes and calls UART_RX_RDY event with null buffer and non-zero amount of bytes. Fixed by generating UART_RX_RDY event only if RX buffer is not null. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit 5db338c) Signed-off-by: Andrzej Głąbek <[email protected]>
gmarull
approved these changes
Feb 16, 2024
krish2718
approved these changes
Feb 18, 2024
nika-nordic
approved these changes
Feb 19, 2024
SeppoTakalo
approved these changes
Feb 19, 2024
jfischer-no
approved these changes
Feb 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A set of fixes from upstream that should be included in NCS 2.6.0